#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Time       :   21:33
# Author     : Y4
# Site       : 
# File       : 09 面向对象-多继承相同方法排序.py
# Software   : PyCharm
import inspect


class Base:
    def test(self):
        print("-------base--------")


class A(Base):
    def test(self):
        print("-------AAAA--------")


class B(Base):
    def test(self):
        print("-------BBBB--------")


class C(Base):
    def test(self):
        print("-------CCCC--------")


class D(A, B, C):
    pass


d = D()
d.test()  # -------AAAA--------

# 继承排序
print(inspect.getmro(D))  # (<class '__main__.D'>, <class '__main__.A'>, <class '__main__.B'>, <class '__main__.C'>, <class '__main__.Base'>, <class 'object'>)
print(D.__mro__)            # (<class '__main__.D'>, <class '__main__.A'>, <class '__main__.B'>, <class '__main__.C'>, <class '__main__.Base'>, <class 'object'>)